On Presentation Response Sent Event
Fires after the SDK successfully sends a proof (presentation) response back to the requesting party.
-
Purpose: Confirm that a proof response was delivered, so you can update UI status, fetch new notifications, or advance the UX flow (e.g. move from a “Respond” screen to a “Thank You” screen).
-
Functionality: Receives a
PresentationResponseResult
object containing at least:isSuccessful
(boolean) – Whether the proof response was accepted by the agency server.
-
Usage:
- Log outcome for diagnostics and analytics.
- Progress UI – mark the proof flow as complete on-screen.
- Trigger follow-ups – e.g. fetch updated notifications or next-step instructions.
-
Example:
import { PresentationResponseResult } from '@one37id/mobile-js-sdk';
import { eventEmitter } from '../services';
const handlers: EventHandlers = {
onPresentationResponseSent: async (
result: PresentationResponseResult
) => {
console.log(
`Proof response sent with result: ${result.isSuccessful}`
);
if (result.isSuccessful) {
// fetch updated notifications to see new tasks or offers
eventEmitter.emit('fetchNotificationsRequested');
} else {
// optionally show an error toast
Toast.show({ title: 'Response failed', message: 'Please try again.' });
}
},
};